package com.codefish.codefishseckill.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 秒杀商品表
 * </p>
 *
 * @author codefish
 * @since 2022-07-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sk_sec_kill_goods")
public class SecKillGoods implements Serializable {

    private static final long serialVersionUID = 1L;




    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 参与秒杀的商品id
     */
    private Long goodsId;

    /**
     * 冗余——商品名称
     */
    private String goodsName;

    /**
     * 商品数量
     */
    private Integer goodsCount;
    /**
     * 秒杀价
     */
    private BigDecimal secKillPrice;

    /**
     * 秒杀开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    private Date startTime;

    /**
     * 秒杀结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    private Date endTime;

}
